package net.xju_19_20.advice;

import org.aspectj.lang.ProceedingJoinPoint;

public class XmlAdvice {

    public void before() {
        System.out.println("before");
    }

    public void after() {
        System.out.println("after");
    }

    public void afterReturning() {
        System.out.println("afterReturning");
    }
    public void afterThrowing() {
        System.out.println("afterThrowing");
    }
    // 环绕通知
    public Object around(ProceedingJoinPoint point) throws Throwable {
        System.out.println("环绕通知之前部分");
// 调用目标方法
        Object proceed = point.proceed();
        System.out.println("环绕通知之后的部分");
        return proceed;
    }
}
